package com.mutouren.modules.org.client.impl;

import com.mutouren.common.entity.Result;
import com.mutouren.common.entity.ResultInfo;
import com.mutouren.common.session.UserInfo;
import com.mutouren.modules.org.client.OrgAuthentication;
import com.mutouren.modules.org.client.proxy.OrgApiProxy;
import com.mutouren.modules.org.entity.IdentityType;

public class OrgAuthenticationImpl implements OrgAuthentication{

	@Override
	public ResultInfo<UserInfo> login(String loginName, String password) {
		return OrgApiProxy.login(loginName, password);
	}

	@Override
	public ResultInfo<UserInfo> mappingUser(String identity, IdentityType identityType) {
		return OrgApiProxy.mappingUser(identity, identityType.name());
	}

	@Override
	public Result modifyPassword(int userId, String oldPassword, String newPassword) {
		return OrgApiProxy.modifyPassword(userId, oldPassword, newPassword);
	}

}
